<extend name="Base/common"/>

<block name="style">
<link href="__CSS__/stylesheet.css" rel="stylesheet">
<link href="__CSS__/identify.css" rel="stylesheet">
</block>

<block name="header">
<header>
	<include file="User/header" />
</header>
</block>

<block name="body">
<div class="container main">
	<div class="user-main">
		<div class="col-xs-3">
			<include file="Identify/left_menu" />
		</div>
		<div class="col-xs-9">
			<h5>发布鉴定宝贝物流单号</h5>
			<div class="content">
				<form action="{:U('AjaxAction/checkupShip')}" method="post" class="form-horizontal" enctype="multipart/form-data">
					<div class="form-group">
						<label class="col-xs-2 control-label">物流公司：</label>
						<div class="col-xs-8">
						<select name="shipping_code" class="form-control">
	     					<volist name="shiping" id="vo">
	     						<option value="{$vo.code}" >{$vo.title}</option>
	     					</volist>				     				
						</select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-xs-2 control-label">物流单号：</label>
						<div class="col-xs-8">
							<div class="input-group">
								<input type="text" name="code" value="" placeholder="物流单号" class="form-control">
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="col-xs-2 control-label">上传物流凭证：</label>
						<div class="col-xs-10 row">
							<div class="col-xs-10">
								<input id="file_img" accept="image/*" name="file_img" style="display: none;">						
							</div>
							<div class="col-xs-10 files">
							
							</div>
						</div>
					</div>					
					<div class="form-group" style="margin-top: 60px !important;">
						<label class="col-xs-2 control-label"></label>
						<div class="col-xs-8">
							<input type="hidden" name="checkupid" value="{$checkupid}" />
							<button type="submit" class="btn ajax-post" target-form="form-horizontal">确认提交</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
</block>

<block name="script">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>					
<script type="text/javascript">
$("#file_img").uploadify({
       "height"          : 30,
       "swf"             : "__STATIC__/uploadify/uploadify.swf",
       "fileObjName"     : "download",
       "buttonText"      : "点击上传",
       "uploader"        : "{:U('File/uploadPicture',array('session_id'=>session_id()))}",
       "width"           : 120,
       'removeTimeout'	  : 1,
       'fileTypeExts'	  : '*.jpg; *.png; *.gif;',
       "onUploadSuccess" : uploadPicture_panel,
       'onFallback' : function() {
           alert('未检测到兼容版本的Flash.');
       }
   });
function uploadPicture_panel(file, data){
   	var data = $.parseJSON(data);							    	
       if(data.status){
       	$(".files").append(
     			"<p class='file-info'>文件名称：<span class='file-name'>"
     			+file.name
     			+"</span>"
     			+"<input type='hidden' name='cover_id[]' value='"+data.id+"' />"
     			+"<a class='fr' href='javascript:;'><i class='icon-remove icon-large' ></i></a></p>"
       	);
       } else {
       	updateAlert(data.info);
       	setTimeout(function(){
               $('#top-alert').find('button').click();
               $(that).removeClass('disabled').prop('disabled',false);
           },1500);
       }
   }
   
$("div").delegate(".icon-remove","click",function(){
	$(this).closest('p').remove();			
});
					
highlight_leftnav("{:U('Identify/add')}");
highlight_subnav("{:U('Identify/index')}");
</script>
</block>